package com.yuxi.common.constant;

import com.yuxi.common.SkMap;

import java.util.Map;

/**
 * @author sunke
 * @version 1.0
 * @Description 页面中英文
 * @date 2023-09-12 20:00
 */
public enum PageKeyEnum {

    NAV_HOME_KEY("navHome", "首页", "Home")
    , NAV_PRODUCTS_KEY("navProducts", "产品", "Products")
    , NAV_ABOUT_KEY("navAboutUs", "关于我们", "About Us")
    , NAV_NEWS_KEY("navNews", "新闻资讯", "News")
    , NAV_CONTACT_KEY("navContact", "联系我们", "Contact"),

    NAV_QUICK_SEARCH_KEY("quickSearch", "快速搜索", "Quick selection"),
    NAV_SEARCH_PLACEHOLDER_KEY("searchPlaceholder", "搜索产品", "Search for products"),

    MAIN_PRODUCT_LABEL_KEY("productLabel", "探索产品", "EXPLORE PRODUCT")
    , MAIN_ABOUT_TITLE_KEY("mainAboutTitle", "我们是谁", "Who we are")
    , MAIN_FACTORY_SQUARE_KEY("factorySquare", "厂房面积", "Square Meters of Factory")
    , MAIN_MONTHLY_CAPACITY_KEY("mainMonthlyCapacity", "月容量", "Pieces Monthly Capacity")
    , MAIN_EMPLOYEE_KEY("employees", "员工人数", "Employees")
    , MAIN_PRODUCTION_LINE_KEY("productionLine", "生产线", "Production Line")
    , MAIN_MACHINE_KEY("machine", "机器", "Machine")
    , MAIN_DESIGN_EACH_YEAR_KEY("designEachYear", "每年设计新款", "Pieces New Design Each Year")
    , MAIN_PARTNER_KEY("partner", "合作伙伴", "Proud to work with"),

    BOTTOM_CONTACT_US("contactUs", "联系我们", "CONTACT US"),
    BOTTOM_MOBILE_KEY("mobile", "移动电话", "Mob"),
    BOTTOM_MOBILE_PHONE_KEY("mobilePhone", "移动电话", "Mobile")
    , BOTTOM_EMAIL_KEY("eMail", "邮箱", "E-Mail")
    , BOTTOM_TELPHONE_KEY("telPhone", "联系电话", "Tel")
    , BOTTOM_FACSIMILE_KEY("facsimile", "传真", "Fax")
    , BOTTOM_WECHAT_KEY("wechatQrCode", "微信二维码", "Wechat")
    , BOTTOM_WHATSAPP_KEY("whatsapp", "WhatsApp二维码", "WhatsApp"),

    READ_MORE_KEY("readMore", "查看更多", "Read More"),

    ABOUT_CHOOSE_LABEL_KEY("chooseLabel", "为什么选择我们", "WHY CHOOSE US"),

    CONTACT_ADDRESS_KEY("address", "公司地址", "ADDRESS")
    , CONTACT_MOBILE_KEY("contactMobild", "联系电话", "MOBILE")
    , CHOOSE_PRODUCT("chooseProduct", "选择你想要的产品", "Choose the product you want")
    , PECENT_POSTS("pecentPosts", "最新发布", "PECENT_POSTS")
    , INPUT_PRODUCT("inputProduct", "Please enter the product name", "PECENT_POSTS")


    ;


    private String key;
    private String cnTitle;
    private String enTitle;
    PageKeyEnum(String key, String cnTitle, String enTitle) {
        this.key = key;
        this.cnTitle = cnTitle;
        this.enTitle = enTitle;
    }

    public static String LANG_CN="cn";
    public static String LANG_EN="en";

    public static Map<String, String> getPageMapByLangCn() {

        return getPageMapByLang(LANG_CN);
    }
    public static Map<String, String> getPageMapByLangEn() {

        return getPageMapByLang(LANG_EN);
    }


    public static Map<String, String> getPageMapByLang(String lang) {
        SkMap resultMap = SkMap.getInstance();

        for (PageKeyEnum pageKeyEnum : PageKeyEnum.values()) {
            if (LANG_CN.equalsIgnoreCase(lang)) {
                resultMap.addObjToMap(pageKeyEnum.getKey(), pageKeyEnum.getCnTitle());
            } else if (LANG_EN.equalsIgnoreCase(lang)) {
                resultMap.addObjToMap(pageKeyEnum.getKey(), pageKeyEnum.getEnTitle());
            }

        }

        return resultMap;


    }

    public String getKey() {
        return key;
    }

    public PageKeyEnum setKey(String key) {
        this.key = key;
        return this;
    }

    public String getCnTitle() {
        return cnTitle;
    }

    public PageKeyEnum setCnTitle(String cnTitle) {
        this.cnTitle = cnTitle;
        return this;
    }

    public String getEnTitle() {
        return enTitle;
    }

    public PageKeyEnum setEnTitle(String enTitle) {
        this.enTitle = enTitle;
        return this;
    }


}
